1 from utils import (
2     get_products,
3     select_by_id_or_name,
4     safe_input
5 )
6
7
8 def query_inventory_data():
9
10     print(
"---Query inventory data---")
11     print(
"Which product is it?")
12
13     list_products = get_products()
14
15     
for products in list_products:
16         print(products[
'name'], products['id'])
17
18     this_product = select_by_id_or_name(list_products,
'product')
19
20     print(
"Description:", this_product["description"])
21     print(
"id:", this_product["id"])
22     print(
"Price per unit:", this_product["price"])
23     print(
"Quantity in stock:", this_product["quantity"])
24     print(
"Season:", this_product["season"])
25     print(
"Categories:", this_product["type"], "-", this_product["sub_type"])


Gõ tìm kiếm nhanh...